package com.familydoctor.agency.aop;

import cn.hutool.aop.aspects.SimpleAspect;
import lombok.extern.slf4j.Slf4j;

import java.lang.reflect.Method;

/**
 * @program: tool
 * @description:
 * @author: tmz
 * @create: 2020-10-12 17:59
 */
@Slf4j
public class ExamAop extends SimpleAspect {
    @Override
    public boolean before(Object target, Method method, Object[] args) {
        return super.before(target, method, args);
    }

    @Override
    public boolean after(Object target, Method method, Object[] args, Object returnVal) {
        return super.after(target, method, args, returnVal);
    }

    @Override
    public boolean afterException(Object target, Method method, Object[] args, Throwable e) {
        log.error(method.getName()+"{}",e);
        return super.afterException(target, method, args, e);
    }
}
